/*
 * JBootCat.java
 *
 * Created on 16 May 2006, 23:30
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package andyr.jbootcat;

import andyr.jbootcat.gui.CorpusDestinationPanel;
import andyr.jbootcat.gui.SearchDownloadPanel;
import andyr.jbootcat.gui.SearchEngineConfigPanel;
import andyr.jbootcat.gui.SearchResultsPanel;
import andyr.jbootcat.gui.SeedPanel;
import andyr.jbootcat.gui.SummaryPanel;
import andyr.jbootcat.gui.TuplePanel;
import andyr.jbootcat.gui.WelcomePanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.netbeans.api.wizard.WizardDisplayer;
import org.netbeans.spi.wizard.Wizard;
import org.netbeans.spi.wizard.WizardPage;
import org.netbeans.spi.wizard.WizardPage.WizardResultProducer;

/**
 *
 * @author Andy Roberts
 */
public class JBootCat {
    
    /** Creates a new instance of JBootCat */
    public JBootCat() {
        
        // Get the native look and feel class name
        String nativeLF = UIManager.getSystemLookAndFeelClassName();
        
        // Motif is ugly. Use the cross-platform instead.
        if (nativeLF.equals("com.sun.java.swing.plaf.motif.MotifLookAndFeel")) {
            nativeLF = UIManager.getCrossPlatformLookAndFeelClassName();
        }
    
        // Install the look and feel
        try {
            UIManager.setLookAndFeel(nativeLF);
        } catch (InstantiationException e) {
            System.err.println(e);
        } catch (ClassNotFoundException e) {
            System.err.println(e);
        } catch (UnsupportedLookAndFeelException e) {
            System.err.println(e);
        } catch (IllegalAccessException e) {
            System.err.println(e);
        }
        
        WizardPage[] wpages = new WizardPage[] {
                new WelcomePanel(),
                new CorpusDestinationPanel(),
                new SeedPanel(),
                new TuplePanel(),
                new SearchEngineConfigPanel(),
                new SearchResultsPanel(),
                new SearchDownloadPanel(),
                new SummaryPanel()
       };
            
        Wizard wizard = WizardPage.createWizard("JBootCat", wpages, WizardResultProducer.NO_OP);
        
        //And show it onscreen
        WizardDisplayer.showWizard (wizard);
        
    }
    
    public static void main(String[] args) {
        
        SwingUtilities.invokeLater(new Runnable(){
            public void run() {
                new JBootCat();
            }});
        
    }
    
    
}
